package com.butte.mound.frame.token;

public class TokenContext {

    private final static ThreadLocal<BaseToken> TOKEN_INFO = new ThreadLocal<>();

    /**
     * 获取Token信息
     */
    public static BaseToken getToken() {
        return TOKEN_INFO.get();
    }

    /**
     * 设置Token信息
     */
    public static void setToken(BaseToken token) {
        TOKEN_INFO.set(token);
    }

    /**
     * 清空Token信息
     */
    public static void cleanToken() {
        TOKEN_INFO.remove();
    }
}